﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WucCloud.Database
{
    /// <summary>
    /// 非泛型仓储 接口（事务操作）
    /// </summary>
    public interface IUnitOfWork
    {
        /// <summary>
        /// 事务操作对象
        /// </summary>
        /// <returns></returns>
        SqlSugarClient GetDbClient();

        /// <summary>
        /// 开启事务
        /// </summary>
        void BeginTran();

        /// <summary>
        /// 提交事务
        /// </summary>
        void CommitTran();

        /// <summary>
        /// 回滚事务
        /// </summary>
        void RollbackTran();
    }
}
